--[[ 编码: WMS-31-10 名称: 盘点差异-盘点差异转移 作者:HAN 日期:2025-1-29 级别:固定 (说明本段代码在项目中不太会变化) 函数: CountDiffProcess 功能: 根据选中的【盘点差异】表重新设置CG_Detail和库存量表 把盘点结果上报给上游系统 更改记录: V2.0 HAN 2025-2-9 盘点差异转移时需要把差异数量批分到 CG_Detail上,如果盘点的时候是把两个相同的货品合并一起盘点的情况 --]] wms_count= require( "wms_count" ) function CountDiffProcess ( strLuaDEID ) local nRet, strRetInfo -- step1 获取当前点中盘点差异 nRet, objs = m3.GetSysDataJson( strLuaDEID ) if ( nRet ~=0 ) then lua.Error( strLuaDEID, debug.getinfo(1), objs ) end nRet, strRetInfo = wms_count.CountDiff_Transfter ( strLuaDEID, objs ) if ( nRet ~= 0 ) then mobox.stopProgram( strLuaDEID, strRetInfo ) return end local nCount = #objs local action if ( nCount == 1 ) then action = { { action_type = "refresh_cur_row", value = "" } } else action = { { action_type = "refresh", value = "" } } end nRet, strRetInfo = mobox.setAction(strLuaDEID, lua.table2str(action)) if ( nRet ~= 0 ) then lua.Error( strLuaDEID, debug.getinfo(1), "setAction错误: "..strRetInfo) end end